<extend name="Public/base" />

<block name="body">
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/jquery-1.7.min.js"></script>
    <div class="main-title cf">
        <h2>新增 [推广员信息]</h2>
    </div>
    <!-- 标签页导航 -->
<div class="tab-wrap">
    <ul class="tab-nav nav">
        <li data-tab="tab1" class="current"><a href="javascript:void(0);">基本信息</a></li></li>
    </ul>
    <div class="tab-content zc_for">
    <!-- 表单 -->
    <form id="form" action="{:U('add?model='.$model['id'])}" method="post" class="form-horizontal">
        <!-- 基础文档模型 -->
        <div id="tab1" class="tab-pane in tab1 tab-look">
            <table  border="0" cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                        <td class="l">登陆账号：</td>
                        <td class="r">
                           <input type="text" class="txt" name="account" value="" >
                        </td>
                        <td class="l">登陆密码：</td>
                        <td class="r">
                           <input type="text" class="txt time" name="password" value="">
                        </td>
                    </tr>
                    <tr>
                        <td class="l">真实姓名：</td>
                        <td class="r">
                           <input type="text" class="txt" name="real_name" value="" placeholder="不可更改">
                        </td>
                      <td class="l">手机号码：</td>
                        <td class="r">
                           <input type="text" class="txt" name="mobile_phone" value=""  placeholder="不可更改">
                        </td> 
                    </tr>
                    <tr>
                    <tr>
                     <td class="l">所属管理员：</td>
                        <td class="r">
                           <select name="admin" id="admin">
                            <option value="0">请选择管理员</option>
                            <volist name=":get_admin_list()" id="vo">
                            <option value="{$vo.uid}">{$vo.nickname}</option>
                            </volist>
                           </select>
                        </td>
                        <td class="l">账号状态：</td>
                        <td class="r">
                            <label class="inp_radio" >
                                <input type="radio"  class="inp_radio" value="0" name="status" >未审核
                                <input type="radio"  class="inp_radio" value="1" name="status" checked="checked">正常
                                <input type="radio" class="inp_radio" value="2" name="status" >拉黑
                            </label>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="form-item cf">
            <input type='hidden' name="id" value="{$data['id']}" />
            <button class="btn submit-btn ajax-post hidden" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <a class="btn btn-return" href="javascript:history.back(-1);">返 回</a>
        </div>
    </form>
    </div>
</div>
</block>

<block name="script">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script><script type="text/javascript" src="__STATIC__/provincecityarea/area1.js"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Promote/lists')}');
Think.setValue("game_type_id", {$data.game_type_id|default = 0});
Think.setValue("category", {$data.category|default = 0});
$('#submit').click(function(){
    $('#form').submit();
});
$(function(){
    showTab();
    prov="{:substr($data['bank_area'],0,2)}";
    city="{:substr($data['bank_area'],2,2)}";
    ciarea="{:substr($data['bank_area'],4,2)}";
    initComplexArea('seachprov', 'seachcity', 'seachdistrict', area_array, sub_array, prov, city, ciarea);
});
//得到地区码
function getAreaID(){
    var area = 0;          
    if($("#seachdistrict").val() != "0"){
        area = $("#seachdistrict").val();                
    }else if ($("#seachcity").val() != "0"){
        area = $("#seachcity").val();
    }else{
        area = $("#seachprov").val();
    }
    return area;
}


//根据地区码查询地区名
function getAreaNamebyID(areaID){
    var areaName = "";
    if(areaID.length == 2){
        areaName = area_array[areaID];
    }else if(areaID.length == 4){
        var index1 = areaID.substring(0, 2);
        areaName = area_array[index1] + " " + sub_array[index1][areaID];
    }else if(areaID.length == 6){
        var index1 = areaID.substring(0, 2);
        var index2 = areaID.substring(0, 4);
        areaName = area_array[index1] + " " + sub_array[index1][index2] + " " + sub_arr[index2][areaID];
    }
    return areaName;
}
</script>
</block>

